home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Found / FWRefCnt / SLRefCnt.idl < prev    next >
Encoding:
Text File  |  1996-09-17  |  1.4 KB  |  72 lines  |  [TEXT/MPS ]

  1. //
  2. //    File:        SLRefCnt.idl
  3. //
  4. //    Contains:    Interface for FW_ORefCount class
  5. //    Release Version:    $ ODF 2 $
  6. //
  7. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  8. //
  9.  
  10. #ifndef SLREFCNT_IDL
  11. #define SLREFCNT_IDL
  12.  
  13. #include <somobj.idl>
  14. #include <somcls.idl>
  15.  
  16.  
  17. //==============================================================================
  18. // Classes defined in this interface
  19. //==============================================================================
  20.  
  21. interface  FW_ORefCount;
  22.  
  23. //==============================================================================
  24. // FW_ORefCount
  25. //    Inspired by ODRefCntObject, renamed to match FW_MRefCount.
  26. //    Semantics match ODRefCntObject: initial count is 0 and instances must be
  27. //    deleted when the count goes to zero.  This allows us to use instances of 
  28. //    this class with FW_TCountedSOMPtr.
  29. //==============================================================================
  30.  
  31. interface FW_ORefCount :  SOMObject
  32. {     
  33.     void Acquire();
  34.     long Release();
  35.       
  36.     long GetRefCount();
  37.  
  38. #ifdef __SOMIDL__
  39. implementation
  40.     {
  41.         functionprefix = FW_ORefCount;
  42.         
  43.         override:
  44.             somInit,
  45.             somUninit;
  46.             
  47.         releaseorder:
  48.             somInit,
  49.             somUninit,
  50.             Acquire,
  51.             Release,
  52.             GetRefCount;
  53.  
  54.         majorversion = 1;
  55.         minorversion = 0;
  56.  
  57.         passthru C_xh =
  58.             "";
  59.  
  60.         passthru C_xih =
  61.             "";
  62.  
  63. #ifdef __PRIVATE__
  64.         long  fRefCount;
  65. #endif
  66.   };
  67. #endif //# __SOMIDL__
  68. };
  69.  
  70. #endif // SLREFCNT_IDL
  71.  
  72.